\section{logspace --- Logarithmically spaced vector}
\label{fn:logspace}
\index{logspace()}
\index{logarithmically spaced vector}
\index{vector!logarithmic}
\begin{rail}
Logspace : 'logspace' '(' Scalar  ',' Scalar ( ',' Scalar)? ')' ;
\end{rail}

\verb+logspace+ creates a vector of logarithmically spaced points.
If the first two arguments are $x_{1}$ and $x_{2}$, then the points are
generated between $10^{x_{1}}$ and $10^{x_{2}}$. If the optional
third argument is present, it specifies how many points are to be
created.  If the third argument is missing, then 50 points are assumed. 

As a special case, if the second argument is equal to $\pi$, then the
points are generated between $10^{x_{1}}$ and $\pi$.

$\Longrightarrow$ This is not an \RLaB\ built-in function.  This function
is normally loaded on start-up from the \verb+logspace.r+ file in the
standard \verb+rlib+ directory. Use of the \verb+-r+ option, incorrectly 
setting the \verb+RLAB_LIB_DIR+ environmental variable, or modifying
\verb+logspace.r+ may make this function unavailable.

\paragraph{Example}
\index{example of logspace()}
\index{logspace()!example}
\begin{verbatim}
> logspace(0,1)
 matrix columns 1 thru 7
        1       1.05        1.1       1.15       1.21       1.26       1.33  

 matrix columns 8 thru 14
     1.39       1.46       1.53        1.6       1.68       1.76       1.84  

 matrix columns 15 thru 21
     1.93       2.02       2.12       2.22       2.33       2.44       2.56  

 matrix columns 22 thru 28
     2.68       2.81       2.95       3.09       3.24       3.39       3.56  

 matrix columns 29 thru 35
     3.73       3.91       4.09       4.29        4.5       4.71       4.94  

 matrix columns 36 thru 42
     5.18       5.43       5.69       5.96       6.25       6.55       6.87  

 matrix columns 43 thru 49
      7.2       7.54       7.91       8.29       8.69        9.1       9.54  

 matrix columns 50 thru 50
       10  
> logspace(1,3,10)
 matrix columns 1 thru 7
       10       16.7       27.8       46.4       77.4        129        215  

 matrix columns 8 thru 10
      359        599      1e+03  
> logspace(0,pi,10)
 matrix columns 1 thru 7
        1       1.14       1.29       1.46       1.66       1.89       2.15  

 matrix columns 8 thru 10
     2.44       2.77       3.14  
\end{verbatim}

See also: Page~\pageref{fn:linspace} \verb+linspace()+.

\newpage




